a year ago
This server provides a comprehensive set of tools for creating, managing, and deploying Hugo sites.
Overview
Installation
Prerequisites
- Python 3.10+
- uv (Python package manager)
- Git (Highly recommended)
Installing the Hugo MCP Server
-
Clone the repository:
git clone https://github.com/sunnycloudyang/hugo-mcp.git -
Add server to your config (make sure
uvhas been installed before):{ "mcpServers": { "hugo-mcp": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/hugo-mcp", "run", "main.py" ] } } }Remember to replace "/ABSOLUTE/PATH/TO/PARENT/FOLDER/hugo-mcp" to your installation path
-
Enalble this mcp server and try it!
Usage
The Hugo MCP server provides a set of tools that can be used to manage Hugo sites. Each tool has specific parameters and returns a structured response.
Troubleshooting
Common Issues
-
Hugo is not installed:
- Use the
install_hugotool to install Hugo.
- Use the
-
Git is not installed:
- Use the
install_gittool to install Git.
- Use the
-
Theme installation fails:
- Check if the theme URL is correct.
- Make sure Git is installed for git submodules.
- Make sure Go is installed for Hugo modules.
- Read the theme's doc to check if there is sth. different
-
Preview server fails to start:
- Check if the port is already in use.
- Make sure the site path is correct.
- Check your network
-
Build fails:
- Check if the site path is correct.
- Make sure all required dependencies are installed.
Getting Help
If you encounter any issues not covered in this documentation, please open an issue on the GitHub repository.
Server Config
{
"mcpServers": {
"hugo-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/hugo-mcp",
"run",
"main.py"
]
}
}
}